< previous page page_566 next page >

Page 566
In Chapter 25, "The Data Control and Data-Bound Controls," you learned how you can write a database application quickly by using the Data control and data-bound controls that come with Visual Basic. This chapter shows you that, by setting a few properties, you can create a nearly complete data entry screen. I say nearly complete because the Data control by itself cannot handle some additional functions of a database application without additional codingfor example, adding or deleting records or finding a specific record.
These additional functions introduce you to some of the programming that you can do in a database application. However, you can write an entire database application with just program commands and not use the Data control at all. When you use just the program commands, you work with Visual Basic's Data Access Objects (DAO).
In this chapter, you learn how you can use Visual Basic's Data Access Objects to create complete, robust data management applications. Data Access Objects act as a Visual Basic program's internal representation of physical data data stored in some type of database or data management engine. Think of the Data Access Objects as special types of variables. These "variables," however, represent data stored outside the program rather than information stored in the computer's memory while the program is running.
Introduction to DAO
Using the Data Access Objects and their associated program commands is more complex than using the Data control and bound controls but does offer greater programming flexibility for many applications. The Data Access Objects and programming commands also provide the basis for many of the actions of the Data control and the bound controls. Therefore, they help you understand the concepts behind the controls. As you saw in Chapter 24, even if you use the Data control, you may also need to write some programming code to augment its capabilities.
To demonstrate the similarities and differences between Data Access Objects and the Data control, this chapter teaches you how to build a data entry screen that works with the BIBLIO.MDB sample database (included with Visual Basic). Figure 26.1 shows the data entry screen that you will build in this chapter.
0566-01.jpg
Figure 26.1
You can create this data entry screen
by following this chapter's instructions.
A key reason for using program commands is the flexibility they give you beyond what is available with the Data control. You can perform more detailed input validation than is possible with

 
< previous page page_566 next page >